package com.offcn.dao;

import com.offcn.entity.CourseUser;
import com.offcn.utils.BaseDao;

import java.util.List;

public class CourseUserDaoImpl extends BaseDao<CourseUser> implements CourseUserDao {
    @Override
    public List<CourseUser> findByIdAndPage(String sql, Object...params) {
        return getMore(sql,CourseUser.class,params);
    }

    @Override
    public int delAll(String id) {
        return update("delete from course_user where id=?",id);
    }

    @Override
    public int updateCourseById(int id, int cid) {
        return update("update course_user set cid=? where id=?",cid,id);
    }

}
